package cn.dai.Reflection.demo;

/**
 * @author ArkD42
 * @file 1 - Java基础语法
 * @create 2020 - 04 - 23 - 9:45
 */

@MyAt("Animal")
public class Animal extends Creature<String> implements Comparable<String>,Plug {

    @MyAt("旺财")
    private String name;
    public int id;

    public Animal() {
    }

    public Animal(String name, int id) {
        this.name = name;
        this.id = id;
    }

    static void haha(){ System.out.println("adasdasdsad"); }

    @MyAt("雪糕")
    public Animal(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @MyAt("中国")
    public String show(String nation){
        System.out.println("我来自："+ nation);
        return nation;
    }


    @Override
    public void info() {
        System.out.println("我是一个动物！！！");
    }

    @Override
    public int compareTo(String o) {
        return 0;
    }

    @Override
    public String toString() {
        return "Animal{" +
                "name='" + name + '\'' +
                ", id=" + id +
                '}';
    }
}
